aux_source_directory(. SOURCESCODE)
include_directories(.)
add_library(kyhw SHARED ${SOURCESCODE})
set_target_properties(kyhw PROPERTIES VERSION 2.0.0 SOVERSION 1)
add_executable(kync-test test/kync-test.c)
add_executable(kycpu-test test/kycpu-test.c)
add_executable(kyprinterlist-test test/kyprinterlist-test.c)
add_executable(kyprinterprint-test test/kyprinterprint-test.c)
add_executable(kyusb-test test/kyusb-test.c)
add_executable(kybios-test test/kybios-test.c)
add_executable(kyboard-test test/kyboard-test.c)
# 额外链接的库在这一行
target_link_libraries(kyhw kylog kyconf pthread systemd cups curl udev)
target_link_libraries(kyprinterprint-test kyhw)
target_link_libraries(kyprinterlist-test kyhw)
target_link_libraries(kync-test kyhw)
target_link_libraries(kycpu-test kyhw)
target_link_libraries(kyusb-test kyhw)
target_link_libraries(kybios-test kyhw)
target_link_libraries(kyboard-test kyhw)

install(TARGETS kyhw
        DESTINATION lib/kysdk/kysdk-system)

install(FILES libkync.h
        DESTINATION include/kysdk/kysdk-system)

install(FILES libkycpu.h
        DESTINATION include/kysdk/kysdk-system)

install(FILES libkyprinter.h
        DESTINATION include/kysdk/kysdk-system)

install(FILES libkybios.h
        DESTINATION include/kysdk/kysdk-system)

install(FILES libkyboard.h
        DESTINATION include/kysdk/kysdk-system)

install(FILES libkyusb.h
        DESTINATION include/kysdk/kysdk-system)